package SingleList;

public class Test {
    public static void main(String[] args) {
        MyLinkedList myLinkedList=new MyLinkedList();
        myLinkedList.addLast(10);
        myLinkedList.addLast(30);
        myLinkedList.addLast(20);
        myLinkedList.addLast(30);
        myLinkedList.addLast(40);
        myLinkedList.addLast(30);
        myLinkedList.print();
        myLinkedList.removeAllKey(30);
        myLinkedList.print();

    }
    public static void main8(String[] args) {
        MyLinkedList myLinkedList=new MyLinkedList();
        myLinkedList.addLast(10);
        myLinkedList.addLast(20);
        myLinkedList.addLast(30);
        myLinkedList.addLast(40);
        myLinkedList.print();
        myLinkedList.remove(30);
        myLinkedList.print();
        myLinkedList.remove(10);
        myLinkedList.print();
        myLinkedList.remove(40);
        myLinkedList.print();
    }
    public static void main7(String[] args) {
        MyLinkedList myLinkedList=new MyLinkedList();
        myLinkedList.creatList();
        myLinkedList.print();
        myLinkedList.addIndex(0,0);
        myLinkedList.addIndex(6,66);
        myLinkedList.print();
    }
    public static void main6(String[] args) {
        MyLinkedList myLinkedList=new MyLinkedList();
        myLinkedList.creatList();
        myLinkedList.print();
        myLinkedList.clear();
        System.out.println("clear之后：");
        myLinkedList.print();
    }
    public static void main5(String[] args) {
        MyLinkedList myLinkedList=new MyLinkedList();
        myLinkedList.addLast(10);
        myLinkedList.addLast(20);
        myLinkedList.addLast(30);
        myLinkedList.print();
    }
    public static void main4(String[] args) {
        MyLinkedList myLinkedList=new MyLinkedList();
        myLinkedList.addFirst(1);
        myLinkedList.addFirst(2);
        myLinkedList.addFirst(3);
        myLinkedList.print();
    }
    public static void main3(String[] args) {
        MyLinkedList myLinkedList=new MyLinkedList();
        myLinkedList.creatList();
        System.out.println(myLinkedList.size());
    }
    public static void main2(String[] args) {
        MyLinkedList myLinkedList=new MyLinkedList();
        myLinkedList.creatList();
        System.out.println(myLinkedList.contains(33));
        System.out.println(myLinkedList.contains(66));

    }
    public static void main1(String[] args) {
        MyLinkedList myLinkedList=new MyLinkedList();
        myLinkedList.creatList();
        myLinkedList.print();
    }
}
